﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="INewsHorizonalBar.ascx.cs" Inherits="Control_INewsHorizonalBar" %>
<asp:Label ID="LB_INewsHorizonalBar" runat="server" Font-Bold="True" Font-Size="Small" ForeColor="Red"></asp:Label>
<div id="demo3" style="overflow: hidden; width: 561px; height: 180px">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td id="demo4">
                <asp:DataList ID="DL_HorizontalList" runat="server" CellPadding="7" CellSpacing="7" Width="100%" RepeatDirection="Horizontal">
                    <ItemTemplate>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td>
                                    <div align="center">
                                        <a href="INewsInfo.aspx?INewsID=<%# Eval("IN_ID") %>">
                                            <img alt="" height="120" src="UploadImage/<%# Eval("IN_SmallThumb") %>" style="border: 0px;"
                                                width="160" /></a>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td height="10">
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div align="center">
                                        <a href="INewsInfo.aspx?INewsID=<%# Eval("IN_ID") %>">
                                            <%# FormatTitle(Eval("IN_Title"))%>
                                        </a>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td height="10">
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                </asp:DataList>
            </td>
            <td id="demo5">
            </td>
        </tr>
    </table>
</div>
<script type="text/javascript">
    var speed=50
    demo5.innerHTML=demo4.innerHTML
    function Marquee(){if(demo5.offsetWidth-demo.scrollLeft<=0){demo3.scrollLeft-=demo4.offsetWidth;}else{demo3.scrollLeft+=2}}
    var MyMar=setInterval(Marquee,speed)
    demo3.onmouseover=function() {clearInterval(MyMar)}
    demo3.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>